﻿using AIO.Entity;
using AIO.Entity.Base;
using AIO.IService;
using AIO.IService.Base;
using AIO.Service.Base;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace AIO.Service
{
    public class DormitoryManagerRepository : BaseRepository<DormitoryManager>, IDormitoryManagerRepository
    {
        protected ApiDBContext _Context { get; set; }
        
        public DormitoryManagerRepository(ApiDBContext dBContext):base(dBContext)        
        {
            _Context = dBContext ?? throw new ArgumentNullException(nameof(dBContext));
        }



        public DormitoryManager? GetByid(Guid id)
        {
            return _Context.DormitoryManagers.FirstOrDefault(s => s.Id == id);
        }
    }   
}
